1. Field Of The Invention
This invention relates generally to computer curve construction systems and methods.
2. Description of Related Art
A cubic Bezier curve is a mathematically defined curve. In a typical computer drawing program, it is drawn by setting four control points, i.e., by setting a start point a0, a start tangent vector v0, an end point a1, and an end tangent vector v1, as shown in FIG. 1. Additional Bezier curves (not shown) may be drawn, each connected to the end point of the previous Bezier curve, to create composite curves by setting additional points and tangent vectors. The length and direction of tangent vectors v0 and v1 are defined by setting their corresponding end points. The depth of the curve is determined by the lengths of tangent vectors v0 and v1, and the slope of the curve is determined by the angles of tangent vectors v0 and v1. Longer tangent vectors produce a curve with greater depth, and more angled tangent vectors produce a curve with greater slope. If at least one tangent vector is long enough, such as tangent vector v1xe2x80x2 in FIG. 2, the beginning of the curve is positioned on the other side of tangent vector v0, and an inflection point b is created at an unpredictable position. The curve is curved clockwise to the left of inflection point b, and counterclockwise to the right of inflection point b. Using the lengths of tangent vectors to determine the depth of a curve is unintuitive and unpredictable, so that the shape of the curve is difficult to control.
With a typical computer drawing program, to be able to trace a curve such as the curve shown in FIG. 4 it usually takes several iterations. FIG. 5 shows a first and second attempt (curves c1 and c2) to trace the curve trying to adjust the length of the end tangent vector, which never achieves the desired curve. FIG. 6 shows a third and fourth attempt (curves c3 and c4) first adjusting the length of the start tangent vector instead of the end tangent vector, and then again adjusting the length of the end tangent vector. The end result is still not quite satisfactory (the peak-point, as described later, is not in the right place, it is too much to the left). Some computer drawing programs allow adjusting a point of the curve at any particular parameter. With this kind of adjustment it is easier to achieve the desired curve than with adjusting the length of the tangent vectors. But it still takes several attempts, and it is not very intuitive, since the point does not have any geometric meaning (even if the original point selected is the peak point, as described later, it does not remain being the peak point, when it is adjusted). However, it is possible to trace the curve in one attempt by using the peak-point curve, which is described later.
In typical computer drawing program, when several Bezier curves are drawn as curve components of one composite curve, they sometimes are not connected very smooth such as the curve components c1 and c2 shown in FIG. 3, because they only connect with the continuity of points and tangent vectors. However, for curvature curves, which are described later, the curve components are connected very smooth such as the curve components c1 and c2 shown in FIG. 35, because they connect with the continuity of points, tangent directions and curvatures.
An object of the present computer curve construction system is to enable the construction of curves more intuitively, predictably, and accurately. Further objects of the present invention will become apparent from a consideration of the drawings and ensuing description. The computer curve construction allows constructing curves which consist of several curve components, which are connected either with G0 continuity, i.e. continuity of points (geometric continuity of order 0), G1 continuity, i.e. continuity of points and tangent directions, just the slopes of the tangents, not the lengths (geometric continuity of order 1), or G2 continuity, i.e. continuity of points, tangent directions, and curvatures (geometric continuity of order 2).
For each curve component certain features are used for its construction. There are different types of curve components, which use different features for their construction. In a first embodiment, for a peak-point curve, the features are start and end points, start and end tangent directions, and a peak point that defines the greatest distance between the curve and the chord, i.e. the connecting line segment between the start and end point. In a second embodiment, for a point-point curve, the features are start and end points, start tangent direction, and a peak point. In a third embodiment, for a point-tangent curve, the features are start and end points, and start and end tangent directions. In a fourth embodiment, for a point curve, the features are start and end points, and a start tangent direction. In a fifth embodiment, for a curvature curve, the features are start and end points, start and end tangent directions, and start and end curvatures. In a sixth embodiment, for a circular arc, the features are start point, start tangent direction, and end point. In a seventh embodiment, for a straight line segment, the features are start point, start tangent direction, and end point.
During or after constructing a curve it is possible to modify the curve by changing the position of a feature of any curve component. In general (if the curve component is not a straight line segment) all features can be changed: the start and end points, the start and end tangent directions, the start and end curvatures, and the peak point. This means that not only the features that were used for the construction of the curve component can be changed, but also the other features, which were set automatically when the curve component was drawn so that they can be changed later. However there is one exception: if the curve component is connected with G2 continuity at the start or end point, the peak point cannot be changed, because when a feature is changed, the types of continuity by which the curve component is connected at the start and end points remain the same.
It is also possible to modify the type of continuity by which two curve components are connected, or to make two curves out of one curve, or one curve out of two curves, to delete and redraw any curve component, or to add or subtract curve components.
This computer curve construction system enables the construction of curves more intuitively, predictably, and accurately, and it is also faster than the computer curve construction systems in typical computer drawing programs.
A better understanding of the features and advantages of the present invention will be obtained by reference to the following detailed description and accompanying drawings which set forth illustrative embodiments in which the principles of the invention are utilized.